home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / hity wydania / Blender 2.49b / blender-2.49b-windows.exe / $_4_ / .blender / scripts / vertexpaint_gradient.py < prev    next >
Text File  |  2009-08-31  |  1KB  |  47 lines

  1. #!BPY
  2. """
  3. Name: 'VCol Gradient...'
  4. Blender: 245
  5. Group: 'VertexPaint'
  6. Tooltip: 'Click on the start and end grad points for the mesh for selected faces.'
  7. """
  8.  
  9. __author__ = "Campbell Barton aka ideasman42"
  10. __url__ = ["www.blender.org", "blenderartists.org", "www.python.org"]
  11. __version__ = "0.1"
  12.  
  13. # ***** BEGIN GPL LICENSE BLOCK *****
  14. #
  15. # This program is free software; you can redistribute it and/or
  16. # modify it under the terms of the GNU General Public License
  17. # as published by the Free Software Foundation; either version 2
  18. # of the License, or (at your option) any later version.
  19. #
  20. # This program is distributed in the hope that it will be useful,
  21. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  22. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  23. # GNU General Public License for more details.
  24. #
  25. # You should have received a copy of the GNU General Public License
  26. # along with this program; if not, write to the Free Software Foundation,
  27. # Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  28. #
  29. # ***** END GPL LICENCE BLOCK *****
  30.  
  31. import mesh_gradient
  32. import Blender
  33.  
  34. def main():
  35.     scn= Blender.Scene.GetCurrent()
  36.     ob= scn.getActiveObject()
  37.     
  38.     if not ob or ob.getType() != 'Mesh':
  39.         Blender.Draw.PupMenu('Error, no active mesh object, aborting.')
  40.         return
  41.     
  42.     mesh_gradient.vertexGradientPick(ob, 1)
  43.     
  44.     
  45. if __name__ == '__main__':
  46.     main()
  47.